/*
 * @Author: xiaoyan
 * @Date: 2021-09-15 14:35:04
 * @LastEditors: xiaoyan
 * @LastEditTime: 2021-09-27 11:30:00
 * @Description: 
 * @FilePath: \vue3-ts-demo\vite.config.ts
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path');
process.env.VUE_APP_VERSION = "1.0.0";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias:{
        '@':path.resolve(__dirname, './src'),
        '~@':path.resolve(__dirname, './src/assets'),
    },
  },
  server: {
    proxy: {
      /* '/sugrec': 'https://www.baidu.com',
      '/lsbdb': {
        target: 'https://www.baidu.com',
        changeOrigin: true,
        // rewrite: path => path.replace(/^\/lsbdb/, '')
      }, */
    },
  },
})
